#if $getVar('puppet_master','') != ''
mkdir -p /etc/puppet /var/lib/hiera
touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
cat <<EOCONF > /etc/puppet/puppet.conf
[main]
    # The Puppet log directory.
    # The default value is '\\$vardir/log'.
    logdir = /var/log/puppet

    # Where Puppet PID files are kept.
    # The default value is '\\$vardir/run'.
    rundir = /var/run/puppet

    # Where SSL certificates are kept.
    # The default value is '\\$confdir/ssl'.
    ssldir = \\$vardir/ssl
    pluginsync = true
[agent]
    # The file in which puppetd stores a list of the classes
    # associated with the retrieved configuratiion.  Can be loaded in
    # the separate ``puppet`` executable using the ``--loadclasses``
    # option.
    # The default value is '\\$confdir/classes.txt'.
    classfile = \\$vardir/classes.txt

    # Where puppetd caches the local configuration.  An
    # extension indicating the cache format is added automatically.
    # The default value is '\\$confdir/localconfig'.
    localconfig = \\$vardir/localconfig
    server = $puppet_master
    # How long the client should wait for the configuration to be retrieved before considering it a failure.
    # It may help with 'execution expired' issue we've experienced.
    configtimeout = 600
    # Don't send reports after every run.
    report = false

EOCONF
#end if
